var util = require('../../utils/util.js');
var wxcache = require('../../utils/wxcache.js');
var api = require('../../config/api.js');
var app = require('../../app.js');
var pay = require('../../services/pay.js');

var app = getApp();
Page({
  data: {
    description : "",
    name : "",
    startAt: "",
    endAt : "",
    primaryImageUrl:"",
    customerPrice:"",
    adultList:[],   
    childList:[],
    addressArray:[],//上车地点
    addressindex:0, 
    priceInfo:{},
    seatStock:'',
    stylePrice:'',
    subCampaignId:'',
    campaignFee:0,
    seatInfoList:null,
    personOrChild:'',
    checkLastDate:'',
    stylePriceArr:[], 
    otherFee:[],
    contractId:'',

    //优惠券页面的参数
    youhuiquanliename: "未选择",
    coupon_1_select_id: "",
    coupon_1_select_coupontype:"",
    youhuiquanliePrice: 0,
    
    seatNum:'未选择',
    maskFlag:true,
    scroll_height:0,

    applyNumber:0,
    car_type_arr:[],
    carNum:1,//第几车
    current_car_apply_pople_num:0, //当前车报名人数
    current_car_seatNum:0, //当前车的座位数
    carNumCC:0
  },

  campaignid:"",
  phoneNumber:"",
  userinfo: { name: '',  mobile: '', idCard: '', address: '点击选择地址'},
  idCardRegex : /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X|x)$/,
  phoneRegex : /^1[34578]\d{9}$/,
  peopleNumRegex : /^[1-9]\d*$/,

  onLoad: function (options) {
    let windowHeight = wx.getSystemInfoSync().windowHeight // 屏幕的高度
    let windowWidth = wx.getSystemInfoSync().windowWidth // 屏幕的宽度
    this.setData({
      scroll_height: windowHeight * 750 / windowWidth
    })

    console.log(options)
    this.setData({
      seatInfoList : JSON.parse(options.seatInfoList)
    });
    var st = options.startAt.replace("-", ".").replace("-", ".");
    var et = options.endAt.replace("-", ".").replace("-", ".");

    this.campaignid = options.id
    this.phoneNumber = wxcache.get("phoneNumber");
    this.juvenilePrice = options.juvenilePrice;
    var addresstmp = JSON.parse(options.addressArray);
    var stylePrice = JSON.parse(options.stylePrice);

    //车座
    this.data.seatStock = options.seatStock;
    
    this.setData({
      personOrChild:options.personOrChild,// 成人/小孩
      checkLastDate:options.checkLastDate,//出行时间
      stylePrice: stylePrice,//费用分类价格
      subCampaignId: options.subCampaignId,//日历子活动id
      contractId:options.contractId//合同Id
    })

    // 默认1个人 
    if (options.personOrChild == '成人'){
      tmp = this.data.adultList;
      tmp.push(Object.assign({}, this.userinfo))
      this.setData({
        primaryImageUrl: options.primaryImageUrl,
        name: options.name,
        description: options.description,
        customerPrice: options.customerPrice,
        startAt: st,
        endAt: et,
        adultList: tmp,
        addressArray: addresstmp
      })
      this.orderTrial()
    } else if (options.personOrChild == '儿童'){
      tmp = this.data.childList;
      tmp.push(Object.assign({}, this.userinfo))
      this.setData({
        primaryImageUrl: options.primaryImageUrl,
        name: options.name,
        description: options.description,
        customerPrice: options.customerPrice,
        startAt: st,
        endAt: et,
        childList: tmp,
        addressArray: addresstmp
      })
      this.orderTrial()
    }
    var tmp = this.data.adultList
    tmp.push(Object.assign({}, this.userinfo))

    this.progressBarInfo();
 
  },
  onReady: function () {
    // 页面渲染完成
  },
  onShow: function () {
    // 页面显示
  },
  onHide: function () {
    // 页面隐藏
  },
  onUnload: function () {
    // 页面关闭
  },

  //获取报名人数进度条
  progressBarInfo:function(){ 
    var _this = this;
    var data = {};  //参数
    data.subCampaignId = _this.data.subCampaignId;   //活动id
    
    util.request(api.childActivityApplyInfo + _this.data.subCampaignId, 'GET').then(function (res) {
      console.log(res);
      _this.setData({
        applyNumber: res.responseBody.number,
        car_type_arr: res.responseBody.car_type
      })
      var carTypeArr = _this.data.car_type_arr;
      var aNumber = _this.data.applyNumber;
      var carTypeArrAllCount = 0;
      for (var a = 0; a < carTypeArr.length; a++) {
        carTypeArrAllCount = carTypeArrAllCount + parseInt(carTypeArr[a]);
      }
      if (carTypeArrAllCount - carTypeArr.length == aNumber) {
        wx.showModal({
          title: '温馨提示',
          content: '车子座位已满，请联系管理员！',
          success: function (res) {
            if (res.confirm) {
              console.log('用户点击确定')
              wx.navigateBack({
                delta: 1
              })
            } else if (res.cancel) {
              console.log('用户点击取消')
              wx.navigateBack({
                delta: 1
              })
            }
          }
        })
      }
      if (carTypeArr[0] - 1 >= aNumber) {
        //第一个车的座位数大于报名人数
        _this.setData({
          carNum: 1,//第几车
          current_car_apply_pople_num: aNumber, //当前车报名人数
          current_car_seatNum: carTypeArr[0] //当前车的座位数
        })
      } else if (carTypeArr[0] - 1 < aNumber) {
        //第一个车的座位数小于报名人数
        for (var i = 1; i < carTypeArr.length; i++) {
          var carTypeArrNum = 0;
          for (var j = i; j >= 0; j--) {
            carTypeArrNum = carTypeArrNum + carTypeArr[j]
            if (carTypeArrNum - (i + 1) >= aNumber) {
              var ccapn = 0;
              for (var k = 0; k < i; k++) {
                ccapn = ccapn + carTypeArr[k];
              }
              _this.setData({
                carNum: i + 1,//第几辆车
                current_car_seatNum: carTypeArr[i],//当前报名车子的座位数
                current_car_apply_pople_num: aNumber - ccapn + i //当前车子的人数
              })
              return;
            }
          }
        }
      }
    });
    
    
    //测试
    // var _this = this;
    // var carTypeArr = [45,37,45,45,49,53,53,49,37];
    // var aNumber = 123;

    // _this.setData({
    //   car_type_arr: carTypeArr
    //   })

    // var carTypeArrAllCount = 0;
    // for (var a = 0; a < carTypeArr.length; a++){
    //   carTypeArrAllCount = carTypeArrAllCount + parseInt(carTypeArr[a]);
    // }
    // if (carTypeArrAllCount-carTypeArr.length == aNumber){
    //   wx.showModal({
    //     title: '温馨提示',
    //     content: '车子座位已满，请联系管理员！',
    //     success: function (res) {
    //       if (res.confirm) {
    //         console.log('用户点击确定')
    //         wx.navigateBack({
    //           delta:1
    //         })
    //       } else if (res.cancel) {
    //         console.log('用户点击取消')
    //         wx.navigateBack({
    //           delta: 1
    //         })
    //       }
    //     }
    //   })
    // }
    // if (carTypeArr[0] - 1 >= aNumber) {
    //   //第一个车的座位数大于报名人数
    //   _this.setData({
    //     carNum: 1,//第几车
    //     current_car_apply_pople_num: aNumber, //当前车报名人数
    //     current_car_seatNum: carTypeArr[0] //当前车的座位数
    //   })
    // } else if (carTypeArr[0] - 1 < aNumber) {
    //   //第一个车的座位数小于报名人数
    //   for (var i = 1; i < carTypeArr.length; i++) {
    //     var carTypeArrNum = 0;
    //     for (var j = i; j >= 0; j--) {
    //       carTypeArrNum = carTypeArrNum + carTypeArr[j]
    //       if (carTypeArrNum - (i + 1) >= aNumber) {
    //         var ccapn = 0;
    //         for (var k = 0; k < i; k++) {
    //           ccapn = ccapn + carTypeArr[k];
    //         }
    //         _this.setData({
    //           carNum: i + 1,//第几辆车
    //           current_car_seatNum: carTypeArr[i],//当前报名车子的座位数
    //           current_car_apply_pople_num: aNumber - ccapn + i //当前车子的人数
    //         })
    //         return;
    //       }
    //     }
    //   }
    // }


  },

  //进入理赔规则
  toInsurance: function (argument) {
    wx.navigateTo({
            url: '/pages/insurance/insurance',
        })
  },

  //进入优惠券页面
  toCoupon: function (argument) {
    wx.navigateTo({
      url: '/pages/ucenter/coupon/coupon?frompage=order&couponId=' + this.data.coupon_1_select_id,
    })
  },
  //进入选座页面
  toSeat: function (argument) {
    var _this = this;
    var cNC = _this.data.carNum;//第几车
    var cCSC = _this.data.current_car_seatNum//当前车座位数
    var cCAPNC = _this.data.current_car_apply_pople_num//当前车报名人数
    var cTAC = _this.data.car_type_arr//所有车子
    var seatStockCC = 0;
    var carNumCC = 0;
    if (cCAPNC < cCSC-1){
       seatStockCC = cCSC;
       carNumCC = cNC-1;
    } else if (cCAPNC == cCSC-1){
      seatStockCC = cTAC[cNC];
      carNumCC = cNC;
    }
    _this.setData({
      carNumCC: carNumCC//当前用户选的车子索引
    })

    var campaign_id = this.campaignid;
    var carSeatId = this.data.seatInfoList[carNumCC].id;
    var seat_stock = seatStockCC;
    if (seat_stock == 53){
      wx.navigateTo({
        url: '/pages/goods/seat/xuanzuo53/xuanzuo53?campaignId=' + campaign_id + '&carSeatId=' + carSeatId
      })
    }
    
    if (seat_stock == 49) {
      wx.navigateTo({
        url: '/pages/goods/seat/xuanzuo49/xuanzuo49?campaignId=' + campaign_id + '&carSeatId=' + carSeatId
      })
    }
    
    if (seat_stock == 45) {
      wx.navigateTo({
        url: '/pages/goods/seat/xuanzuo45/xuanzuo45?campaignId=' + campaign_id + '&carSeatId=' + carSeatId
      })
    }
    
    if (seat_stock == 37) {
      wx.navigateTo({
        url: '/pages/goods/seat/xuanzuo37/xuanzuo37?campaignId=' + campaign_id + '&carSeatId=' + carSeatId
      })
    }
    
  },
 


   // 检测成人输入框变化
  adultInput:function(e){

    var num = e.detail.value;
    var  regex= this.peopleNumRegex

    var flag = regex.test(num)
    if(flag){

    
      var tmp = []
      for (var i = 0; i < num; i++) {
        tmp.push(Object.assign({}, this.userinfo))
      }
    
      this.setData({
          adultList: tmp
      })

    }else{

      if (num == ''){
        wx.showModal({
          content: '至少要一个成人喔~',
          showCancel: false
        })

      }else{
        wx.showModal({
          content: '输入有误，请重新输入',
          showCancel: false
        })
    
      }
      this.setData({
        adultList: new Array(Object.assign({}, this.userinfo))
      })
      
    } 

    this.orderTrial()
  },

  // 检测未成年人输入框变化
  childInput:function(e){

    var num = e.detail.value;
    var regex= this.peopleNumRegex
    var flag = regex.test(num)
    if(flag){
 
      var tmp=[]
      for (var i = 0; i < num; i++) {
        tmp.push(Object.assign({}, this.userinfo))
      }
      this.setData({
        childList: tmp
      })
    }else{
      if (num != '') {
        wx.showModal({
          content: '输入有误，请重新输入',
          showCancel: false
        })

      }else{
        this.setData({
          childList: []
        })
      }  
    }

    this.orderTrial()
  },

  //添加成人用户
  addAdult:function(e){

    var tmp = this.data.adultList
    tmp.push(Object.assign({}, this.userinfo))
    this.setData({
      adultList : tmp
    })
    this.orderTrial()

  },

  //添加儿童用户
  addChild:function(e){

    var tmp = this.data.childList
    tmp.push(Object.assign({}, this.userinfo))
    this.setData({
      childList : tmp 
    })

    this.orderTrial()
  },

  // 监听姓名输入
  nameInput:function(e){
    
    console.log(e)

    var id = e.currentTarget.id;
    var type = e.currentTarget.dataset.type;
    var name = e.detail.value

    if(type == "adult"){

        for (var i=0;i<this.data.adultList.length;i++){
            
            if ( i == id){
              this.data.adultList[i].name = name;
            }
        }

    }else{

        for (var i=0;i<this.data.childList.length;i++){
            
            if ( i == id){
              this.data.childList[i].name = name;
            }
        }
    }
  },
   // 监听手机号输入
  phoneInput:function(e){
    
    console.log(e)

    var id = e.currentTarget.id;
    var type = e.currentTarget.dataset.type;
    var mobile = e.detail.value

    var regex = this.phoneRegex

    if (!mobile){
      console.log("手机号输入为空")
      return
    }

    if (!regex.test(mobile)) {
      wx.showModal({
        content: '手机号码输入有误，请重新输入！',
        showCancel: false
      })
      return
    }

    if(type == "adult"){

        for (var i=0;i<this.data.adultList.length;i++){
            
            if ( i == id){
              this.data.adultList[i].mobile = mobile;
            }
        }

    }else{

        for (var i=0;i<this.data.childList.length;i++){
            
            if ( i == id){
              this.data.childList[i].mobile = mobile;
            }
        }
    }
  },

  // 监听身份证号输入
  idCardInput:function(e){
    
    console.log(e)

    var id = e.currentTarget.id;
    var type = e.currentTarget.dataset.type;
    var idCard = e.detail.value

    var regex = this.idCardRegex

    if (!idCard) {
      console.log("身份证输入为空")
      return
    }

    if(!regex.test(idCard)){
      wx.showModal({
        content: '身份证号码输入有误，请重新输入！',
        showCancel: false
      })
      return
    }

    if(type == "adult"){

        for (var i=0;i<this.data.adultList.length;i++){
            
            if ( i == id){
              this.data.adultList[i].idCard = idCard;
            }
        }

    }else{

        for (var i=0;i<this.data.childList.length;i++){
            
            if ( i == id){
              this.data.childList[i].idCard = idCard;
            }
        }
    }
  },

  // 选择器，选择上车地点
  bindAddressChange:function(e){
    
    console.log(e)
    let that = this

    var id = e.currentTarget.id;
    var type = e.currentTarget.dataset.type;
    var boardingLocation = e.detail.value
    

    if (type == "adult") {


      for (var i = 0; i < that.data.adultList.length; i++) {

        if (i == id) {

          //用中间变量存储复杂类型
          let dataIntro = {};
           
          let keyIntro = 'adultList[' + i + '].address';
          dataIntro[keyIntro] = that.data.addressArray[parseInt(boardingLocation)]
          that.setData(dataIntro)
        }
      }

    } else {

      for (var i = 0; i < this.data.childList.length; i++) {

        if (i == id) {

          let dataIntro = {};
          let keyIntro = 'childList[' + i + '].address';
          dataIntro[keyIntro] = that.data.addressArray[parseInt(boardingLocation)]

          that.setData(dataIntro)
        }
      }

    }
  },


  //优惠券点击
  


  // 再次校验游客信息
  checkInfo: function (e) {
      let that = this
      var userInfoList = [];
      var adultListTmp = that.data.adultList[0]
      var childListTmp = that.data.childList[0]
      if (that.data.personOrChild == '成人'){
        childListTmp = [];
        userInfoList = adultListTmp;
      }
      if (that.data.personOrChild == '儿童'){
        adultListTmp = [];
        userInfoList = childListTmp;
      }
      var adult = userInfoList;
      if(!adult.name){
          console.log("name error")
          wx.showModal({
            title: '',
            content: '请输入游客的姓名' ,
            showCancel:false
          })
          return false
      }
      if(!that.phoneRegex.test(adult.mobile)){
          console.log("phone error")
          wx.showModal({
            title: '',
            content: '游客手机号输入有误',
            showCancel: false
          })
          return false
      }
      if (!that.idCardRegex.test(adult.idCard)) {
        console.log("phone error")
        wx.showModal({
          title: '',
          content: '游客身份证输入有误',
          showCancel: false
        })
        return false
      }
      if (adult.address == "点击选择地址") {   
            console.log("phone error")
            wx.showModal({
              title: '',
              content: '请选择游客的上车地点',
              showCancel: false
            })
            return false
      }
      if (that.data.seatNum == '未选择') {
        wx.showModal({
          title: '',
          content: '请选择游客的座位',
          showCancel: false
        })
        return false
      }
      
      return true;
  },


  /**
   * 价格试算
   */
  orderTrial: function (e) {
    var that = this;
    var data = {};  //参数
    data.campaignId = that.campaignid;   //活动id
    data.subCampaignId = that.data.subCampaignId; //日历子活动id
    var campaignFeeNum = 0;
    if (that.data.stylePriceArr.length>0){
      for (var i = 0; i < that.data.stylePriceArr.length; i++) {
        campaignFeeNum = campaignFeeNum + parseInt(that.data.stylePriceArr[i]);
      }
      that.setData({
        campaignFee: campaignFeeNum
      })
    }else{
      that.setData({
        campaignFee: 0
      })
    }
    data.campaignFee = that.data.campaignFee; //其他费用，餐费，住宿等等
  
    // data.insuranceId = [1]; //保险id，可传列表  1,2,3
     
    if (that.data.coupon_1_select_coupontype == '') {
      data.couponIds = [];
    } else {
      data.couponIds = [parseInt(that.data.coupon_1_select_coupontype)];
    }
    // data.adultNum = that.data.adultList.length;  //成年人购票个数
    // if (data.adultNum == ""){
    //   data.adultNum = 0;
    // }
    // data.juvenileNum = that.data.childList.length;   //未成年人购票个数
    // if (data.juvenileNum == ""){
    //   data.juvenileNum = 0;
    // }
    if(that.data.personOrChild == '成人'){
      data.adultNum = 1;
      data.juvenileNum = 0;
    }
    if (that.data.personOrChild == '儿童') {
      data.adultNum = 0;
      data.juvenileNum = 1;
    }
    util.request(api.OrderTrial, data, 'POST').then(function (res) {
      console.log(res);
      // 库存不够
      if (res.code == 1000){
        wx.showModal({
          title: '温馨提示',
          content: res.responseBody,
          showCancel: false
        })

        that.setData({
          adultList: new Array(that.userinfo),
          childList: []
        });
        return false;
      }

      that.setData({
        priceInfo: res.responseBody
      });

    });
  },

  // 下单
  orderCreate:function( e){
    let that = this;
    var adultListRes = [];
    var childListRes = [];
    var userInfoList = [];
    if (that.data.adultList.length>0){
      childListRes = [];
      adultListRes = that.data.adultList[0];
      adultListRes.originSelectNo = that.data.seatNum;
      adultListRes.seatId = this.data.seatInfoList[that.data.carNumCC].id;
      adultListRes.carNo = that.data.carNumCC+1;
      userInfoList = adultListRes;
    }
    if (that.data.childList.length>0){
      adultListRes = [];
      childListRes = that.data.childList[0];
      childListRes.originSelectNo = that.data.seatNum;
      childListRes.seatId = this.data.seatInfoList[that.data.carNumCC].id;
      childListRes.carNo = that.data.carNumCC + 1;
      userInfoList = childListRes;
    }
    var userInfoListArr = [];
    userInfoListArr.push(userInfoList);
    var campaignidArr = [];
    campaignidArr.push(that.campaignid);
    if(!that.checkInfo()){
      return
    }
    // 报名人信息
    var uid = wxcache.get("userInfo").id;
    var uname = wxcache.get("userInfo").nickName;
    var data = {};
    data.totalPeople = 1;
    data.userInfoList = userInfoListArr;
    data.campaignId = campaignidArr;
    data.subCampaignId = that.data.subCampaignId;
    data.applicantId = uid + "";
    data.name = uname;
    data.insuranceId = [];
    data.principal = Math.round(that.data.priceInfo.totalAmount * 100, 0) ;
    data.principal = data.principal >= 0? data.principal : 0;
    data.goodsTotalAmount = that.data.priceInfo.goodsTotalAmount;
    data.couponTotalAmount = that.data.priceInfo.couponTotalAmount;
    data.otherFee = that.data.otherFee;
    if (that.data.coupon_1_select_id == '') {
      data.couponId = [];
    } else {
      data.couponId = [that.data.coupon_1_select_id];
    }
    data.mobile = wxcache.get("phoneNumber");;//手机号
    console.log(data)
    util.request(api.OrderCreate, data, 'POST').then(function (res) {
      console.log(res)
      if (res.code == 1000 && res.responseBody == "下单失败") {
        wx.showModal({
          title: '温馨提示',
          content: res.responseBody + " 请联系客服",
          showCancel: false
        })
        return;
      }
      if (res.code == 1000 && res.responseBody == "订单金额不能小于零;") {
        wx.showModal({
          title: '温馨提示',
          content: res.responseBody+"请联系客服",
          showCancel: false
        })
        return;
      }
      if (res.code == 1000 && res.responseBody == "存在未支付订单,不能重复下单;") {
        wx.showModal({
          title: '温馨提示',
          content: res.responseBody,
          success: function (re) {
            if (re.confirm) {
              console.log('用户点击确定')
              wx.redirectTo({
                url: '/pages/ucenter/order/order?tab=1'
              })
            } else if (re.cancel) {
              console.log('用户点击取消')
              wx.redirectTo({
                url: '/pages/ucenter/order/order?tab=1'
              })
            }
          }
        })
        return;
      }
      console.log("下单成功即将进行支付...");
      console.log(res);
      var payDescription = res.responseBody.payDescription;
      var countDownTime = res.responseBody.countDownTime;
      that.setData({
        orderNo: res.responseBody.orderId
      });
      //支付
      that.pay();
    })
  },

  // 支付
  pay: function () {
    //支付
    var data = {};
    data.payMoney = Math.round(this.data.priceInfo.totalAmount * 100, 0);
    data.payMoney = data.payMoney >= 0 ? data.payMoney : 0;
    data.body = this.data.name;
    data.detail = "";
    data.attach = "";
    data.orderNo = this.data.orderNo;
    pay.payOrder(data).then(function (res) {
      console.log(res)
      if (res.errMsg == "requestPayment:ok") {
        wx.showModal({
          title: '温馨提示',
          content: '支付完成!',
          success: function (re) {
            if (re.confirm) {
              console.log('用户点击确定')
              wx.redirectTo({
                url: '/pages/ucenter/order/order?tab=2'
              })
            } else if (re.cancel) {
              console.log('用户点击取消')
              wx.redirectTo({
                url: '/pages/ucenter/order/order?tab=2'
              })
            }
          }
        })
      }
    }).catch(function (res) {
      console.log(res)
      if (res.errMsg == "requestPayment:fail cancel") {
        wx.showModal({
          title: '温馨提示',
          content: '请在5分钟内支付完成',
          success: function (re) {
            if (re.confirm) {
              console.log('用户点击确定')
              wx.redirectTo({
                url: '/pages/ucenter/order/order?tab=1'
              })
            } else if (re.cancel) {
              console.log('用户点击取消')
              wx.redirectTo({
                url: '/pages/ucenter/order/order?tab=1'
              })
            }
          }
        })
      } else if (res.errMsg.startsWith("requestPayment:fail")) {
          wx.showModal({
            title: '提示',
            content: '支付失败，请稍后重试',
            showCancel: false,
            success:function(e){
              wx.navigateTo({
                url: '/pages/ucenter/order/order?tab=1',
              })
            }
          })
      }
    })
  },
  checkboxChange:function(e){
    var selectInfo = e.detail.value;
    var setSelectInfo = [];
    var setSelectInfoArr = [];
    for (var i = 0; i < selectInfo.length; i++){
      var selectInfo_i_arr = selectInfo[i].split(':');
      var selectInfo_i_arr_0 = selectInfo_i_arr[0];
      var selectInfo_i_arr_1 = selectInfo_i_arr[1];
      setSelectInfo.push(selectInfo_i_arr_1);
      setSelectInfoArr.push({
        key: selectInfo_i_arr_0,
        value: selectInfo_i_arr_1
      });
    }
    this.setData({
      stylePriceArr: setSelectInfo,
      otherFee: setSelectInfoArr
    })
    this.orderTrial();
  },
  showFlag:function(){
    var _this = this;
    wx.navigateTo({
      url: '/pages/insurancetemplate/insurancetemplate?contractId=' + _this.data.contractId,
    })
  },
  displayFlag: function () {
    this.setData({
      maskFlag: true
    })
  },
  allCarBar:function(){
    var _this = this;
    wx.navigateTo({
      url: '/pages/allcarbar/allcarbar?a=' + _this.data.carNum + '&b=' + _this.data.current_car_apply_pople_num + '&c=' + JSON.stringify(_this.data.car_type_arr) + '&d=' + _this.data.current_car_seatNum,
    })
  }

})